/*
 * gdata.h
 *
 *  Created on: Dec 5, 2011
 *      Author: kylintse
 */

#ifndef GDATA_H_
#define GDATA_H_

#include "gtype.h"
#include "klog.h"
#include "PanelLed.h"
#include "kWatchDog.h"
#include "BatteryStatus.h"

extern ParamEthernet gEthernetParm[];
extern ParamSerial gSerialParm[];

extern QString gswitchAddr;
extern QString gswitchType;

extern QString gCan0Bitrate;
extern QString gCan1Bitrate;

extern qint8 gMprDevice;

extern QList<ParamDevice*> gDeviceListParam;

extern QMap<quint32,ParamHy103Cpu*> gHy103Cpu;

extern QList<ParamDeviceProtocol*> gDeviceProtocolParam;

extern QString gActiveSector;
extern QString gWorkDir;

extern klog* glog;

extern const int led_DC;
extern const int led_AC1;
extern const int led_AC2;
extern const int led_Rs485[];
extern const int led_Can[];

extern const int led_Eth0;
extern const int led_Eth1;

extern PanelLed* gled;

extern kWatchDog* gwatchDog;

#define BAT_CPU_NUM	0xFF

extern BatteryStatus gbattery;

bool saveParam();
QStringList sectorList();

#endif /* GDATA_H_ */
